Skip to content

Conversation

akuhlens
Copy link
Contributor

Just an update to comments that I accidentally did on a testing repo and didn't get included in the final merge of #159477.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:semantics labels Sep 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2025

@llvm/pr-subscribers-flang-semantics

Author: Andre Kuhlenschmidt (akuhlens)

Changes

Just an update to comments that I accidentally did on a testing repo and didn't get included in the final merge of #159477.


Full diff: https://github.com/llvm/llvm-project/pull/160186.diff

1 Files Affected:

  • (modified) flang/lib/Semantics/check-call.cpp (+4-4)
diff --git a/flang/lib/Semantics/check-call.cpp b/flang/lib/Semantics/check-call.cpp
index 41c18a35f9678..797fd067b8185 100644
--- a/flang/lib/Semantics/check-call.cpp
+++ b/flang/lib/Semantics/check-call.cpp
@@ -811,7 +811,7 @@ static void CheckExplicitDataArg(const characteristics::DummyDataObject &dummy,
   // General implementation of F'23 15.5.2.5 note 5
   // Adds a less specific error message for any copy-out that could overwrite
   // a unread value in the actual argument.
-  // Occurences of volatileOrAsyncNeedsTempDiagnosticIssued = true indicate a
+  // Occurences of `volatileOrAsyncNeedsTempDiagnosticIssued = true` indicate a
   // more specific error message has already been issued. We might be able to
   // clean this up by switching the coding style of MayNeedCopy to be more like
   // WhyNotDefinable.
@@ -828,8 +828,8 @@ static void CheckExplicitDataArg(const characteristics::DummyDataObject &dummy,
   // If there are any cases where we don't need a copy and some other compiler
   // does, we issue a portability warning here.
   if (context.ShouldWarn(common::UsageWarning::Portability)) {
-    // Nag, GFortran, and NVFortran all error on this case, even though it is
-    // ok, prossibly as an over-restriction of F'23 C1548.
+    // 3 other compilers error on this case even though it is ok.
+    // Possibly as an over-restriction of F'23 C1548.
     if (!copyOutNeeded && !volatileOrAsyncNeedsTempDiagnosticIssued &&
         (!dummyIsValue && (dummyIsAsynchronous || dummyIsVolatile)) &&
         !(actualIsAsynchronous || actualIsVolatile) &&
@@ -842,7 +842,7 @@ static void CheckExplicitDataArg(const characteristics::DummyDataObject &dummy,
           actual.AsFortran(), dummyName,
           dummyIsAsynchronous ? "ASYNCHRONOUS" : "VOLATILE");
     }
-    // Probably an over-restriction of F'23 15.5.2.5 note 5
+    // Possibly an over-restriction of F'23 15.5.2.5 note 5
     if (copyOutNeeded && !volatileOrAsyncNeedsTempDiagnosticIssued) {
       if ((dummyIsVolatile && !actualIsVolatile && !actualIsAsynchronous) ||
           (dummyIsAsynchronous && !actualIsVolatile && !actualIsAsynchronous)) {

@akuhlens akuhlens merged commit f9cf60b into llvm:main Sep 22, 2025
12 checks passed
// Adds a less specific error message for any copy-out that could overwrite
// a unread value in the actual argument.
// Occurences of volatileOrAsyncNeedsTempDiagnosticIssued = true indicate a
// Occurences of `volatileOrAsyncNeedsTempDiagnosticIssued = true` indicate a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's spelled "occurrences" with two Rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:semantics flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants